Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes: Introduce custom shader nodes for Mitsuba BSDFs #31

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ros-dorian
Copy link
Collaborator

@ros-dorian ros-dorian commented Aug 25, 2022

Although Mitsuba BSDFs can be approximated using Blender shader nodes during import, the conversion is not flawless and leads to inconsistencies when exporting.

Therefore, we introduce custom shader nodes that perfectly match Mitsuba's BSDFs and textures. This has the great advantages to allow for a perfect import/export loop and finer control over the look of each material.

This feature is enabled by first selecting the Mitsuba rendering engine and then clicking on Use Mitsuba Material Nodes in the material sidebar while in the shading tab.

material_editor

The node editor then provides access to the wide library of BSDFs available in Mitsuba in the same fashion as Blender's Cycles.

nodes

ℹ️ Note that this feature does not implement rendering and the users can still use the experimental Cycles conversion to visualize the materials in a scene.

@ros-dorian ros-dorian added the enhancement New feature or request label Aug 25, 2022
@ros-dorian ros-dorian self-assigned this Aug 25, 2022
@ros-dorian ros-dorian force-pushed the feature/material-nodes branch 2 times, most recently from 3978972 to fb59713 Compare August 26, 2022 10:52
@ros-dorian ros-dorian force-pushed the feature/material-nodes branch from 0ce52c6 to 3da61eb Compare September 3, 2022 15:39
@ros-dorian ros-dorian force-pushed the feature/material-nodes branch from b92d99f to 7edc090 Compare October 15, 2022 10:15
@DoeringChristian
Copy link

DoeringChristian commented Nov 11, 2022

Hi,
I think it should be possible to implement some of the Blender nodes in mitsuba using a custom bsdf.
I have written a crude prototype for this idea.
There are some problems that probably cannot be fixed without some changes to mitsuba though.
Since mitsuba uses megakernels it would be interesting to see what the performance is for large procedural materials.

@ros-dorian
Copy link
Collaborator Author

Hello,

Thank you for the comment. This could be a nice complementary feature to this PR. Could you maybe open a new PR with your example factored as a Blender shader node (built on top of what is implemented in this PR). You probably need to wait until this PR is merged first though :)

Cheers!

@arpit15
Copy link

arpit15 commented Sep 17, 2023

@ros-dorian Is there a plan to merge this?

@ros-dorian ros-dorian marked this pull request as ready for review November 12, 2023 21:31
@nebnes
Copy link

nebnes commented Mar 28, 2024

It will be a super useful feature !
@ros-dorian Some update about it ?

@ros-dorian
Copy link
Collaborator Author

Hi @nebnes,

Thanks for your interest. The only reason this PR is not merged is because of some memory corruptions inside Blender which is caused by the custom node editor. It seems to also be an issue with other add-ons that have the same functionality. I did not try to see if the problem still occurs with more recent Blender versions (or if this code is still compatible altogether).

I will spend a bit of time updating the PR and do some testing and I will report my findings here.

Cheers!

@nebnes
Copy link

nebnes commented Mar 29, 2024

Hi @ros-dorian,
Thanks a lot for the update :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants